<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.pineapple.module.core.login.domain.User" %>
<html>
<head>
<script language="javascript">
function gotoLogOff(){
	if(!confirm('คูณต้องการจะออกจากระบบหรือไม่')){
		return false;
	}
	frm = document.menuForm;
	frm.action="<s:url value='/logoutLogin.action'/>";
	frm.submit();
	
	return true;
}

</script>
<link href="<s:url value='/css/not-ie.css' />" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<s:url value='/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js' />" ></script>
<script type="text/javascript" src="<s:url value='/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js' />" ></script>
<link rel="stylesheet" href="<s:url value='/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.css' />" />
</head>
<%
HttpSession sessionUser = request.getSession();
User user = (User)session.getAttribute("user");
%>
<form name="menuForm">
<%if(user != null){ %>
<table class="header">
		<tr>
			<td style="padding: 0px; height: 0px;">
				<s:include value="/jsp/template/mainMenu.jsp" />
			</td>
		</tr>	
	<tr>	
		<td class="right">
		<% if(user.getName()!= null){%>
			<s:text name="ผู้ใช้"/>&nbsp;&nbsp;:&nbsp;<%=user.getSurName()%>
			<a href="#" 
				onclick="if(!gotoLogOff()){return false;}" class="header">
				<input type='image' src='<s:url value='/images/logout-icon1.png'/>' title="ออกจากระบบ"></a>
			<%}%>
		</td>
	</tr>
</table>
<%}%>
</form>
</html>
